<template>
	<!-- 打卡框 -->
	<up-modal
		:show="showLocation"
		@confirm="confirmLocation"
		@cancel="closeLocation"
		@close="closeLocation"
		title="打卡" >
		<view class="slot-location">
			
		</view>
	</up-modal>
</template>

<script setup>
import { ref } from "vue"
import { tab, auth, modal } from "@/plugins"
import { getUserLocation } from '@/utils/ty.js'
	const props = defineProps({
		showLocation: Boolean
	})
	// 关闭弹窗
	const closeLocation = () => {
		
	}
	// 确认打卡
	const isLocation = ref(false)
	const confirmLocation = () => {
		isLocation.value = true
		getUserLocation().then(res => {
			console.log(res)
			isLocation.value = false
		}).catch(err => {
			modal.showToast(err)
			isLocation.value = false
		})
	}
</script>

<style lang="scss">
	.slot-location {
		
	}
</style>